package com.wdm.model;

import com.wdm.utils.Convert;
import org.springframework.data.annotation.Id;
import org.springframework.data.redis.core.RedisHash;
import org.springframework.data.redis.core.index.Indexed;

import java.util.Date;

/**
 * Created by Administrator on 2016-5-5.
 */
@RedisHash("AlumniRedis")
public class AlumniRedis
{
    @Id
    String id;

    @Indexed  String name;

     String sex;

    String unit;

     String post;

     String technicalTitle;

    String major;

    String classes;

     String enterDate;

     String leaveDate;

     String department;

     String address;

     String mobile;

     String tel;

     String email;

     String qq;

     String wchat;

     String other;

     String memo;

    public AlumniRedis()
    {
    }

    public AlumniRedis(Alumni alumni)
    {
        this.id=alumni.getId().toString();
        this.name=alumni.getName();
        this.sex=alumni.getSex();
        this.unit=alumni.getUnit();
        this.post=alumni.getPost();
        this.technicalTitle=alumni.getTechnicalTitle();
        this.major=alumni.getMajor();
        this.classes=alumni.getClasses();
        this.enterDate= Convert.DataToString(alumni.getEnterDate());
        this.leaveDate=Convert.DataToString(alumni.getLeaveDate());
        this.department=alumni.getDepartment();
        this.address=alumni.getAddress();
        this.mobile=alumni.getMobile();
        this.tel=alumni.getTel();
        this.email=alumni.getEmail();
        this.qq=alumni.getQq();
        this.wchat=alumni.getWchat();
        this.other=alumni.getOther();
        this.memo=alumni.getMemo();
    }

    public String getId()
    {
        return id;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getSex()
    {
        return sex;
    }

    public void setSex(String sex)
    {
        this.sex = sex;
    }

    public String getUnit()
    {
        return unit;
    }

    public void setUnit(String unit)
    {
        this.unit = unit;
    }

    public String getPost()
    {
        return post;
    }

    public void setPost(String post)
    {
        this.post = post;
    }

    public String getTechnicalTitle()
    {
        return technicalTitle;
    }

    public void setTechnicalTitle(String technicalTitle)
    {
        this.technicalTitle = technicalTitle;
    }

    public String getMajor()
    {
        return major;
    }

    public void setMajor(String major)
    {
        this.major = major;
    }

    public String getClasses()
    {
        return classes;
    }

    public void setClasses(String classes)
    {
        this.classes = classes;
    }

    public String getEnterDate()
    {
        return enterDate;
    }

    public void setEnterDate(String enterDate)
    {
        this.enterDate = enterDate;
    }

    public String getLeaveDate()
    {
        return leaveDate;
    }

    public void setLeaveDate(String leaveDate)
    {
        this.leaveDate = leaveDate;
    }

    public String getDepartment()
    {
        return department;
    }

    public void setDepartment(String department)
    {
        this.department = department;
    }

    public String getAddress()
    {
        return address;
    }

    public void setAddress(String address)
    {
        this.address = address;
    }

    public String getMobile()
    {
        return mobile;
    }

    public void setMobile(String mobile)
    {
        this.mobile = mobile;
    }

    public String getTel()
    {
        return tel;
    }

    public void setTel(String tel)
    {
        this.tel = tel;
    }

    public String getEmail()
    {
        return email;
    }

    public void setEmail(String email)
    {
        this.email = email;
    }

    public String getQq()
    {
        return qq;
    }

    public void setQq(String qq)
    {
        this.qq = qq;
    }

    public String getWchat()
    {
        return wchat;
    }

    public void setWchat(String wchat)
    {
        this.wchat = wchat;
    }

    public String getOther()
    {
        return other;
    }

    public void setOther(String other)
    {
        this.other = other;
    }

    public String getMemo()
    {
        return memo;
    }

    public void setMemo(String memo)
    {
        this.memo = memo;
    }
}
